package com.hzdl.hotel.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzdl.hotel.bean.Advice;
import com.hzdl.hotel.bean.Check;
import com.hzdl.hotel.mapper.CheckMapper;
import com.hzdl.hotel.service.CheckService;
import com.hzdl.hotel.vo.CheckVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CheckServiceImpl implements CheckService {
    @Autowired
    private CheckMapper cm;

    @Override
    public PageInfo findCheckByWhere(CheckVo checkVo) {
        PageHelper.startPage(checkVo.getPage(),checkVo.getLimit());
        List<Check> cList = cm.findCheckByWhere(checkVo);
        PageInfo pageInfo = new PageInfo(cList);
        return pageInfo;

    }

    @Override
    public Check findByCheckId(String checkId) {
        return cm.findByCheckId(checkId);
    }
}
